package com.jiangyg.mall.authz.support.authentication.member;

import com.jiangyg.mall.authz.service.MemberUserDetailsService;
import org.springframework.security.authentication.AuthenticationProvider;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.AuthenticationException;

/**
 * 类描述：会员用户认证授权器
 *
 * @author jiangyg
 * @version 4.0
 * @date 2022-01-06
 */
public class MemberUserAuthenticationProvider implements AuthenticationProvider {

    /**
     * 会员用户信息查询实现
     */
    private MemberUserDetailsService memberUserDetailsService;

    @Override
    public Authentication authenticate(Authentication authentication) throws AuthenticationException {
        return null;
    }

    @Override
    public boolean supports(Class<?> authentication) {
        return MemberUserAuthentication.class.isAssignableFrom(authentication);
    }

    public void setMemberUserDetailsService(MemberUserDetailsService memberUserDetailsService) {
        this.memberUserDetailsService = memberUserDetailsService;
    }

}
